home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / AmokEd / doc / AmokEd.doc < prev    next >
Encoding:
Text File  |  1996-09-27  |  56.0 KB  |  1,320 lines

  1. ---------------------------------------------------------------------------
  2.  
  3.                              A m o k E d
  4.                          ===================
  5.  
  6.                              Version 1.30
  7.  
  8. ---------------------------------------------------------------------------
  9.  
  10.   AmokEd V1.30  Copyright 1990-1992 Hartmut Goebel, All Rights Reserved
  11.  
  12.   [ AmokEd V1.20 Translated English Documentation  Copyright 1992
  13.     F. Sullivan Segal, All Rights Reserved, except as noted below. ]
  14.  
  15.   This entire package is designated Freeware. You may copy and distribute
  16.   it as often as you like with the following limitations:
  17.  
  18.   * The package must remain complete and unchanged
  19.   * This package must not be distributed for profit.  Distribution  by
  20.     diskette is forbidden to exceed DM 5.00 (ca. $4).
  21.   * Donations are welcome.
  22.   * It is expressly forbidden to use this program, or any programs  or
  23.     data developed  using  this  program  to  directly  or  indirectly
  24.     benefit the military.
  25.   * The following persons or firms are  prohibited  from  distributing
  26.     this package, either in full or in part:
  27.         Fa. Stefan Ossowski, Fa. Karstadt
  28.  
  29.   The Author:
  30.  
  31.   Hartmut Goebel
  32.   Aufseplatz 5                 UseNet: hartmut@oberon.nbg.sub.org
  33.   (W-)8500 NÜrnberg 40         Z-Netz: HARTMUT@ASN.ZER
  34.   Deutschland                  Fido:   Hartmut Goebel of 2:2400/111
  35.  
  36.  
  37.   For Translation information:
  38.     F. Sullivan Segal
  39.      SnailMail:                          InterNet:
  40.         38000 Camden St #97                fletcher@netcom.com
  41.         Fremont, CA 94526
  42.         U.S.A  ]
  43.  
  44.  
  45.   I owe thanks to the following people:
  46.  
  47.   - Matthew Dillon:   for his original DME
  48.   - Volker Rudolph:   for numerous tips, routines, and moral support
  49.   - Werner Speer:     for help in getting started in the form of the first
  50.                       parser
  51.   - Tobias Ruland:    for help with assembler things
  52.   - Thomas Wagner:    for creative beta-testing
  53.   - Jrgen Walleneit:  for the disk icon
  54.   - have I forgotten anyone?  Then thanks to you as well!
  55.  
  56. ---------------------------------------------------------------------------
  57.  
  58. Contents
  59.  
  60.   I Introduction
  61.     Invocation, the configuration file
  62.  II Macros
  63. III Keymaps
  64.  IV How to load and save files
  65.   V Workbench support
  66.  VI ARexx support
  67. VII The application port
  68.  
  69.                         ----------------------
  70.                 ----------         I        ----------
  71.                 ----------   Introduction   ----------
  72.                         ----------------------
  73.  
  74.   AmokEd is a free programmable editor. It is based on the well  known
  75. DME editor created by Matthew Dillon, using many fartures  of  AmigaOS
  76. 2.0. It supports several capabilities  which  have  made  it  quite  a
  77. challenging  (programming)  project  to  complete.  Here  is  a  quick
  78. overview:
  79.  
  80.  - A rich command language.  Commands  can  be  entered  directly,  or
  81.    mapped to the keyboard and then executed  automatically  each  time
  82.    the key is pressed. (Each key can  be  bound  in  combination  with
  83.    various qualifiers and mouse buttons for a total of 128 macros  for
  84.    each  key!)  Each  key  and   button   combination   can   be   set
  85.    individually.
  86.  
  87.  - An Arexx interface makes it possible to use AmokEd as  a  component
  88.    of a much more complex system. Through the use of external  macros,
  89.    even external programs can be controlled.
  90.  
  91.  - A special Arexx-based application port  makes  it  easy  to  create
  92.    application related extensions which should not blow up AmokEd.
  93.  
  94.  - Variables make the macro language very flexible. (e.g:  Macros  can
  95.    be kept in a variable and  then  executed).  Environment  variables
  96.    are also supported (ENV:).
  97.  
  98.  - The user can define pull-down menus  that  work  with  all  of  the
  99.    normal macros and variables. Check menus (including the  checkmark)
  100.    can even be built.
  101.  
  102.  - Scrolling is very fast, and now there are also scroll  gadgets  and
  103.    a scroll bar.
  104.  
  105.  - The title line of each window includes information about  the  text
  106.    being edited:  file  name,  actual  cursor  position,  modification
  107.    status of the text ...
  108.  
  109.    Future versions will eventually allow the user  the  specify  which
  110.    information should be displayed.
  111.  
  112.  - Numerous files can be opened and  edited  in  separate  windows  at
  113.    once. Windows can be iconified. The next version  will  also  allow
  114.    you to edit the same file from different windows.
  115.  
  116.  - AmokEd is rentrant and can be made resident.  (See  the  'resident'
  117.    command in the AmigaDos manual).
  118.  
  119.   Amoked was developed to correct some of  the  deficiencies  of  DME,
  120. and to further develop the capabilities of that  program.  AmokEd  was
  121. written in Oberon, a strongly typed language. It is the author's  hope
  122. that  the  rigorous  nature  of  this  language  will  aid  in  future
  123. development.  Much  development  is  made  even  easier  through   the
  124. inclusion of the application port.
  125.  
  126.   AmokEd can be invoked with any number  of  filenames  as  arguments.
  127. These files are loaded automatically as the program starts up.
  128.  
  129.  
  130. AmokEd now needs AmigaOS2.0 or higher!!
  131.  
  132. Invocation
  133. ----------
  134.  
  135.   AmokEd is quite easy to load:
  136.  
  137.     from the CLI: AmokEd {Template}
  138.  
  139.       Template:
  140.          FILES/M,SETTING/K,SOURCE/K,
  141.          SD=SCREENDEPTH/K/N,PS=PUBSCREEN/K,PORTNAME/K,
  142.          NOAPPMENU/S,
  143.          LEFTEDGE/K/N,TOPEDGE/K/N,WIDTH/K/N,HEIGHT/K/N
  144.  
  145.     from WorkBench: click on the icon (multiple selections are permitted)
  146.         The ToolTypes accord with the long forms of the CLI-options.
  147.  
  148.  
  149.      SETTING <file>       config file to be used
  150.      SOURCE <name>        use file <name> to initialize instead of the one
  151.                           defined in the configfile
  152.      SD=SCREENDEPTH N     open a screen with N bitplanes ( 2**N colors)
  153.      PS=PUBSCREEN <name>  name of the public screen, AmokEd should
  154.                           open respectively should open its windows on
  155.      PORTNAME <name>      name to be used for the Arexx port
  156.      NOAPPMENU            do _not_ generate an entry for Workbench's
  157.                           Tools menu
  158.      LEFTEDGE N           Horizontal window position x = N
  159.      TOPEDGE N            Vertical window position y = N
  160.      WIDTH N              Window width = N
  161.      HEIGHT N             Window height = N
  162.  
  163.  
  164.      Submitting an empty string ("") as <name> parameter  will  force
  165.      AmokEd to use the defaults.
  166.  
  167.      If a screen respectivly a port with the  given name already
  168.      exists, the name will be made unique by appending  a  number,
  169.      e.g. MyScreen.2.
  170.      Default names _always_ are appended by a number.
  171.  
  172.      If AmokEd does not open its windows on Workbench's  screen  there
  173.      an entry to WB's Tools menu is be generated.  If this  entry  is
  174.      selected AmoEd will bring the screen to  front  and  activate  the
  175.      text window last recently used.
  176.      The option NOAPPMENU suppresses this entry.
  177.  
  178.      If AmokEd opens its windows on  Workbench  you  can  drop  icons
  179.      into them (AppWindows). AmokEd tries to load the related  files.
  180.      Hereby the configuration for the new window(s) (window sizes,
  181.      local switches etc.)  will be cloned from the window the icons
  182.      are dropped into.
  183.  
  184.  
  185. The Configuration File
  186. ----------------------
  187.  
  188. AmokEd can save some parameters in a configuration file.  The  configs
  189. in this file can be partly altered via  ToolTypes  or  shell  options,
  190. partly manipulated via makro commands.
  191.  
  192. At the moment AmokEd saves the following informations:
  193.  - window position and size, number of bitplanes
  194.  - position and size of the filerequester
  195.  - tabsize
  196.  - status of the toggles WordWrap, SaveTabs,  InsertMode,  IgnoreCase,
  197.       SaveIcons, NoAppMenu
  198.  - name of screen, ARexx port and init  file  (only  if  the  defaults
  199.    have been overwritten)
  200.  
  201. The search order for the config file is (if SETTING is not given):
  202.   1) AmokEd.config in the current dir
  203.   2) the file given in the environment variable `AmokEdConfig'
  204.   3) AmokEd.config in the directory where AmokEd resides *)
  205.   4) ENV:AmokEd/AmokEd.config
  206.  
  207.   *) not possible if AmokEd is held resident
  208.  
  209. It is recommended to submit an  init  file  for  the  very  first  call
  210. of AmokEd (via option/ToolType SOURCE)  and  save  the  configuration.
  211.  
  212.  
  213.                    -------------------------
  214.               --------        II         ----------
  215.               --------      Macros       ----------
  216.                    -------------------------
  217.  
  218.   The behaviour of AmokEd can be  greatly  customized  to  the  user's
  219. wishes through a large number of built-in commands. Sets  of  commands
  220. can be combined and referred to as a single macro.  These  macros  can
  221. then be reused in turn to create higher order macros.
  222.  
  223.   Each command  consists  of  a  keyword,  and  a  *fixed*  number  of
  224. arguments  (between  zero  and three).   Between  the   keyword,   and
  225. separating each argument is one or more spaces. To build  an  argument
  226. that contains a space, the argument can be enclosed in parentheses.
  227.  
  228.   E.g:
  229.        (this is a single argument)
  230.        these are four arguments
  231.  
  232.   Alternatively the argument can be  surrounded  by  open  and  closed
  233. single quotes (`').
  234.  
  235.   Text that is to be  included  verbatim  is  likewise  surrounded  by
  236. either parens or quotes.
  237.  
  238.   Commands are  not  case  sensitive,  nor  are  most  arguments.  The
  239. exceptions  are  build-in  variables(  qqv.),  internal   keyboard-key
  240. references (qqv.), and literal  text.   In  the  examples  below,  the
  241. following rules apply:
  242.  
  243.      right               - move the cursor right.  No parameters.
  244.      return              - end the line.  No parameters
  245.      map <key> <binding> - map a binding to a keyboard key. Two parameters.
  246.  
  247.   Macro Examples:
  248.      right right (Hallo) right right (Hallo) return
  249.      map f3 (up right) map f5 (down left)
  250.      map f10 ((Hallo))
  251.  
  252.  
  253.   As you can see illustrated above, if  a  command  doesn't  need  any
  254. arguments, it doesn't take any. The  interpreter  continues  with  the
  255. next keyword as the next separate command.  By  surrounding  the  word
  256. 'Hallo' in parenthesis above, you are  telling  the  interpreter  that
  257. this is literal text. The literal text will be added to  the  document
  258. at what ever position the cusor is left in after  moving  twice  right
  259. its location at macro invocation.
  260.  
  261.   One more because it is really important:
  262.  
  263.   The 'map' command takes two arguments. The  first  argument  is  the
  264. key to bind (e.g: f3), the second is the  set  of  macro  commands  to
  265. execute. The commands 'up' and 'right'  will  be  bound  to  the  'f3'
  266. key.  At the first iteration, the  parentheses  which  turn  'up'  and
  267. 'right' into a single parameter  are  removed,  and  the  results  are
  268. put into 'f3'.   When  the  user  later  presses  the  'f3'  key,  the
  269. commands will be interpreted and executed individually.
  270.  
  271.   map f5 right                   - In this case 'right'  is  only  one
  272.                                    word, and doesn't need any parens.
  273.  
  274.   map f5 (right right)           - <f4> is mapped to move  the  cursor
  275.                                    right twice.  If the parens had been
  276.                                    left out, the commands wouldn't  be
  277.                                    combined into a  single  parameter,
  278.                                    so the last right would  have  been
  279.                                    performed immediately, and not mapped.
  280.  
  281.   map c-del `repeat cright del'  - Equivalent to the 'remeol'  command
  282.                                    (qqv.).
  283.  
  284.   Some  of  these  arguments  end  up  going   through   the   command
  285. inrepreter multiple times.
  286.  
  287.   The 'map' command is a good example.  While  the  'map'  command  is
  288. being interpreted,  the  interpreter  looks  ahead  to  pull  out  the
  289. arguments it will need for the command.  The  interpreter  then  looks
  290. at the command again when the key is pressed.  Thus  if  you  want  to
  291. bind a key which  will  insert  text  into  your  file,  you  have  to
  292. surround the text is a double set of parentheses.  The  first  set  is
  293. removed on the initial pass through the  interpreter.   If  none  were
  294. left during the  second  pass  the  interpreter  would  be  unable  to
  295. recognize the command, and issue an error.
  296.  
  297.   Some more complex examples follow:
  298.  
  299.   map f4 (right right (Hallo) wleft)  *RIGHT*
  300.   map f4 right right (Hallo) wleft    *WRONG*
  301.  
  302.   map f4 (map f4 ((Hallo)))  - Builds a binding for  <f4>  which  will
  303.                                reprogram the key after the first  time
  304.                                it is pressed  which  will  output  the
  305.                                text 'Hallo' the after the second.
  306.  
  307.   map c-i (repeat tr (( )))  - In this  example  you  can  see  how  a
  308.                                literal   space   character   can    be
  309.                                included   in   a   'repeat'    command
  310.                                embedded  in  a  'map'  command.   (The
  311.                                space  ends  up   going   through   the
  312.                                interpreter  3   times   before   being
  313.                                interpreted as an actual space.   Count
  314.                                the closing parentheses.)
  315.  
  316.  
  317.   An easy way to test commands or key-map changes, is either to  press
  318. the escape key (which will bring up the command-line),  or  under  the
  319. default keymap, to press 'a-S' (<Alt><Shift>S) which causes  the  line
  320. under the cursor to be interpreted as a command.
  321.  
  322.   In other words, AmokEd can be used as its own debugger, to help  you
  323. to build and test new key-maps and macros.
  324.  
  325.  
  326.            ----------   STRING VARIABLES   ----------
  327.  
  328.   String variables are replaced with their contents.  There are  three
  329. ways of referencing a variable:
  330.  
  331.     $varname      - The variable must be alpha-numberic (ie:  it  must
  332.                     consist of the letters 'A-Z', 'a-z', '0'-9', '_' or
  333.                     '-'.)
  334.     $(varname)    - The variable name can have any symbols except  the
  335.                     parentheses symbols.
  336.     $`varname'    - The variable name can have any symbols except  the
  337.                     open and closed quote marks.
  338.  
  339.   The alternative forms of variable name references make  it  possible
  340. to have unusual variable names, such as those  which  include  spaces,
  341.  or periods, or other junk.
  342.  
  343.   There are several special variables:
  344.  
  345.     filename      - current file name (only filepart)
  346.     path          - full path to the files directory
  347.     modified      - modification state of the text
  348.     scanf         - the last scanned string (q.v. Command SCANF).
  349.     portname      - name of the AmokEd ARexx-port
  350.     screenname    - name of the public screen
  351.     findstr       - current search string
  352.     repstr        - current replacement string
  353.     lineno        - current line number [1..n]
  354.     colno         - current row number [1..n]
  355.     margin        - margin column (q.v Command MARGIN).
  356.     currentline   - contents of the current line
  357.     winleft, wintop, winwidth, winheight
  358.                   - actual window position ans size (in pixels)
  359.     tmpleft, tmptop, tmpwidth, tmpheight
  360.                   - the values set with TMP* (in pixels)
  361.  
  362.   Other variable names are resolved using the following search order:
  363.  
  364.   (1) Internal variables (q.v: SET, UNSET).
  365.       These variables are stored as local variables of the current
  366.       process and removed when closing AmokEd.
  367.   (2) Global environment variables (q.v: SETENV, UNSETENV).
  368.   (3) AmokEd keymap macros, or menu definitions.  In this way you  can
  369.       re-use a key definition in another key definition.  For example,
  370.       $sa-tab would include the current definition of the <Shift><Alt>
  371.       <Tab> key in the command that is being interpreted.
  372.   (4) If ARexx is installed and running, the macro is handed  over  to
  373.       the Rexx interpreter.
  374.  
  375.   Variable of kind (1) and (2) are not case sensitive for compatibility
  376.   with AmigaDos.
  377. __________________________________________________________________________
  378.  
  379. NOTE: What is wrong with this command?
  380.  
  381.     repeat 100 (first ($myvar))
  382.  
  383.   The problem is that the variable 'myvar' is expanded  at  the  first
  384. iteration of  the  interpreter.   If  the  variable  were  to  contain
  385. something such as an open parenthsis '(', the  command  would  end  up
  386. looking like this:
  387.     repeat 100 (first (())
  388.  
  389.   If you count parens, you  will  notice  that  there  are  more  open
  390. parens than closed.  This is obviously not what the macro  writer  had
  391. in mind. By replacing the '$' with '\$' the expansion of the  variable
  392. can be delayed one iteration.
  393.  
  394.     repeat 100 (first (\$myvar))
  395.  
  396.   Here on the first  iteration,  '\$myvar'  is  reduced  to  '$myvar'.
  397. When the entry is again looked at by the interpreter (as literal  text
  398. following the 'first' command) the variable will be expanded and  used
  399. correctly.
  400.  
  401.   Problems like this are especially evident when  you  are  redefining
  402. keys. In all probability if you include a variable  in  a  macro,  you
  403. won't want  the  value  of  the  variable  bound  literally  into  the
  404. command, otherwise it you  wouldn't  be  able  to  change  it  without
  405. redefining the whole key.
  406.  
  407.   On the other hand it is entirely legal:
  408.  
  409.     set x (tlate +1)
  410.     map f5 (repeat 100 ($x))
  411.  
  412.   Whatever the value of 'x' is changed  to  later,  <f5>  will  always
  413. perform the command '(tlate +1)' a hundred times...
  414.  
  415.   Had the variable been  left  outside  parentheses  (except  for  the
  416. syntax problems it would introduce),  the  variable  would  have  been
  417. interpreted as an immediate command,  and  not  given  to  the  repeat
  418. command as text.
  419.  
  420.             --------   SPECIAL CHARACTERS   ---------
  421.  
  422. `^' The carat is used for control characters.
  423.     Eg: ^c is used to represent <Control>C (Ascii 03)
  424.     The NUL character, ^@, is not supported, since it is used internally
  425.     as an end of line marker.
  426.  
  427. `\' The backslash overrides  the  special  meaning  of  the  following
  428.     character.
  429.     Eg:   map c-a ((^l))    - makes <Control>A produce Ascii 12
  430.           map c-a ((\\\^l)) - makes <Control>A produce the string '^l'
  431.                               (carat-l).   The  first  '\'  makes  the
  432.                               second a literal backslash.   The  third
  433.                               overrides  the  carat.    The   key   is
  434.                               thereby defined to be '\^l'.
  435.  
  436.  
  437.             ---------   COMMAND LIST   ---------
  438.  
  439. #                -The rest of the line is comment
  440. (text)           -Output text as if it had been typed
  441. keyname          -executes a keymapped key definition as a macro
  442. header-item      -executes a menu selection as a macro (Eg: Project-Save)
  443. ABORT            -stops macro execution
  444. APPL             -starts an application (qv: Section VII, Application-Port)
  445. APPLCLOSE        -stop an application  (qv: Section VII, `Application'-Port)
  446. ARPBSAVE         -BSAVE   FileRequester    \
  447. ARPINSFILE       -INSFILE FileRequester     |
  448. ARPLOAD          -NEWFILE FileRequester     |   if ASL-Lib is installed
  449. ARPSAVE          -SAVEAS  FileRequester     |
  450. ARPSAVECFG       -SAVECONFIG FileRequester  |
  451. ARPSOURCE        -SOURCE  FileRequester    /
  452. ASCII            -returns the ASCII value of the character under the cursor
  453. BACK             -the same as BS
  454. BACKTAB          -Back up one tab spacing
  455. BCOPY            -copy the marked block to the line before the current one
  456. BDELETE          -delete the marked block from the text
  457. BLOCK            -mark the beginning or end of a block
  458. BMOVE            -move the marked block to the line before the current one
  459. BOTTOM           -jump to the end of the file
  460. BS               -`backspace' (delete to the left of the cursor)
  461. BSAVE file       -save the block in the named file <file>
  462. BSOURCE          -execute the marked block as if it were a macro file
  463. CD dir           -change the current directory
  464. CHECKRESET hdr-item
  465.                  -removes the checkmark from a menu item
  466. CHECKSET hdr-item
  467.                  -turns on the checkmark for a menu item
  468. CHECKTOGGLE hdr-item
  469.                  -toggles the checkmark in a menu item
  470. CHFILENAME name -changes the working name of the file
  471. CLEARMAP         -deletes the keymap, and reinstates the defaults.
  472. DEL              -`delete' (delete the character under the cursor)
  473. DELINE           -delete a line (qv: UNDELINE)
  474. DOWN             -Cursor down
  475. DOWNADD          -Cursor down.  If at the end of the file, add a line to file
  476. ESC              -Enter a direct command line
  477. ESCIMM arg       -Enter a direct command line the argument text all ready
  478.                   entered
  479. EXECUTE comm     -Execute a CLI command **)
  480. FIND string      -set the search string (qv: NEXT)
  481. FINDR fstr rstr  -set the replace string (qv: NEXTR)
  482. FINDSTR          -set the search string
  483. FIRST            -jump to column 1 (the first)
  484. FIRSTNB          -jump to the first non-blank column
  485. GOTO BLOCK       -jump to the beginning of the marked block (or the beginning
  486.                   of the file.)
  487. GOTOCOL          -put the cusor at column N (counting from 1)
  488. GOTO END         -jump to the end of the marked block (no motion if unmarked)
  489. GOTO START       -equivalent to GOTO BLOCK
  490. GOTO [+/-]n      -jump forward or backward N lines from the current position
  491. HEIGHT n         -sets the height of all new windows in pixels
  492. ICONIFY          -iconify the window (see below)
  493. IF cnd act       -IF/WHILE/IFELSE .. flow control (see below)
  494. IFELSE cnd ifact elseact
  495.                  -(see below)
  496. INDENT           -indents a line further in (see UNINDENT, and INDENT below)
  497. INSERT text      -inserts text before the cursor independently of the current
  498.                   setting of InsertMode
  499. INSFILE file     -reads and inserts a file before the current line
  500. INSLINE          -inserts a line before the current one
  501. JOIN             -joins the next line and the current one together
  502. JUSTIFY type     -left and right justifies the line with a width of $margin
  503.                   <type> = FULL -> justify full
  504.                   (others are not implemented now)
  505. LAST             -jumps to just after the last non-blank character on the line
  506. LEFT             -move the cursor left
  507. LEFTEDGE n       -sets the initial location of the left edge of all new windows
  508.                   in pixels.
  509. MAP key map      -overlays a key with an interpreted value
  510. MARGIN n         -sets the right margine for automatic word-wrap and reformat (qqv.)
  511. MATCHBRACKET     -finds matching bracket
  512. MENUADD  hdr item cmd
  513.                  -adds a pull down menu item
  514. MENUADDSEP hdr   -adds a separator line to the menu
  515. MENUADDT hdr item cmd
  516.                  -adds a menu item with a check-mark
  517. MENUCLEAR        -deletes all mouse menus
  518. MENUDEL hdr item -deletes a single menu item
  519. MENUDELHDR hdr   -deletes all items under a single menu
  520. MENUOFF          -disables menus (multiple calls are maintained)
  521. MENUON           -enables menus (menus are only enabled if all MENUOFF commands
  522.                   have been offset.
  523. MULTIREPLACE f s -interactive search and replace
  524. MYPRI n          -change the task priority to N (-128 .. 127)
  525. NEWFILE file     -change the current file to a new file <file>
  526. NEWWINDOW        -open a new editor window (see LEFTEDGE, TOPEDGE, WIDTH, HEIGHT)
  527. NEXT             -search for the next occurrence of a string (see FIND, FINDSTR)
  528. NEXTR            -search and replace the next string (see FINDR, FINDSTR, REPSTR)
  529. NEXTWIN          -activate the next text-window *)
  530. NOSCRUPDATE      -disable screen updates for the duration of this macro
  531. NULL             -do nothing (see IFELSE, etc.)
  532. OBERROR action   -error funcions for AmigaOberon (see below)
  533. OVERWRITE text   -overwrites text in the document with the text given independently
  534.                   of the current setting of insert mode.
  535. PAGEDOWN         -move one page downwards (see PAGESET)
  536. PAGESET n        -set the page size for PAGEUP, and PAGEDOWN to n% of the window size
  537. PAGEUP           -move one page upwards (see PAGESET)
  538. PING n           -set a text marker (0 .. 9)
  539. PONG n           -jump to the previously set text marker (0 .. 9) *)
  540. PREV             -jump to the previous cursor position that was found using the
  541.                   string search function (FIND, NEXT)
  542. PREVR            -jump to the previous cursor position that was used for a search
  543.                   and replace function (FINDR, NEXTR)
  544. PREVWIN          -activate the previous window *)
  545. POPMARK          -retrieve the marked block previously pushed. (PUSHMARK)
  546. PURGEMARK        -remove a pushed block from memory.
  547. PUSHMARK         -store the marked block in memory, and unmark the block.
  548. QUIT             -exit without saving
  549. RECALL           -opens the command line, and shows the previously executed command.
  550.                   This command must be mapped to a key (eg: c-esc)
  551. REFORMAT         -Reformats the paragraph until either an empty line is encountered,
  552.                   or a line that is indented further.
  553. REMSOL           -Remove all text between the cursor and the beginning of the line
  554. REMEOL           -Remove all text between the cursor and the end of the line
  555. REPEAT cnd comm  -(see below)
  556. REPSTR string    -sets the replacement string
  557. RESETTOGGLE toggle
  558.                  -deletes a memory toggle (see below)
  559. RESIZE cols rows -change the size of the current window (e.g: resize 70 23)
  560. RETURN           -the same as (FIRST DOWNADD)
  561. RIGHT            -Move the cursor one column to the right
  562. RX               -activate an ARexx macro without arguments (RX makroname) (see below)
  563. RX1              -activate an ARexx macro with one argument (RX makroname arg)
  564. RX2              -activate an ARexx macro with two arguments (RX makroname arg1 arg2)
  565. RXS              -activate an ARexx command directly
  566. SAVEAS file      -save the current text to a named file
  567. SAVECONFIG       -save the current configuration (including window size) to the default
  568.                   configuration file
  569. SAVEMAP file     -save the users keymap overlay to a file
  570. SAVEOLD          -save the current text under its current name
  571. SAVESMAP file    -save all mapped keys including those that are mapped by the system
  572. SCANF ctlstr     -read the string at the current cursor position (see below)
  573. SCREENBOTTOM     -move the cursor to the bottom of the screen
  574. SCREENTOP        -move the cursor to the top of the screen
  575. SCROLLDOWN       -scroll the file one line up the screen.  The cursor is not moved.
  576. SCROLLUP         -scroll the file one line down the screen. The cursor is not moved.
  577. SET var str      -initialize or change an internal variable
  578. SETENV var str   -initialize or change an environment variable (ENV:)
  579. SETFONT font size-change the window font (eg: setfont topaz.font 11)
  580. SETPATTERN pat   -set pattern for File-Requester
  581. SETTOGGLE toggle -set a toggle (see below)
  582. SOURCE file      -interpret a script file
  583. SPLIT            -splits a line at the current column
  584. SWAPCHAR         -swaps the character under the cursor with the one to the right of it
  585. SWAPMARK         -PUSHMARK, swap the top two blocks marked in memory, POPMARK
  586. TAB              -Move one tab position to the right
  587. TABINDENT        -Indents a line to the next tab stop (see TABSTOP)
  588. TABSTOP n        -sets tab stops at every 'n' columns
  589. TABUNINDENT      -unindents a line by one tab stop (see TABSTOP)
  590. TITLE string     -changes the string in the title bar of the window
  591. TLATE [+/-]n     -adds or subtracts the value 'n' to the ascii value of the character
  592.                   under the cursor
  593. TMPHEIGHT n      -changes the height to be used for the next window opened
  594. TMPLEFT n        -changes the leftedge to be used for the next window opened
  595. TMPTOP n         -changes the topedge to be used for the next window opened
  596. TMPWIDTH n       -changes the width to be used for the next window opened
  597. TOGGLE toggle    -flips the setting of the given toggle (see below)
  598. TOMOUSE          -move the cursor to the mouse position
  599. TOP              -jump to the beginning of the text
  600. TOPEDGE n        -changes the position of the top of each new window to 'n' pixels
  601. UNBLOCK          -removes the current block markings
  602. UNDELINE         -recalls a line previously deleted with DELINE
  603. UNDO             -undoes changes to the current line (this must be mapped to a key
  604.                   in order to work.)  Moving the cursor off of the line makes the
  605.                   changes permanent.
  606. UNINDENT         -unindents a line by one column (see INDENT below)
  607. UNJUSTIFY        -removes neighboring spaces from the text, to unjustify a justified
  608.                   paragraph.
  609. UNMAP key        -deletes mapping of a key
  610. UNSET var        -removes an internal variable
  611. UNSETENV var     -removes an environment variable (ENV:)
  612. UP               -move the cursor up a line
  613. WHILE cnd act    -(see below)
  614. WIDTH n          -change the width of all new windows to 'n' pixels
  615. WLEFT            -move to the beginning of the previous word.  If the cursor is within
  616.                   a word, the cursor then moves to the beginning of this word.
  617. WRIGHT           -jump to the beginning of the next word.
  618.  
  619. NOTES
  620.  *)
  621.    PONG can also jump to another edit window.  If you  are  running  a
  622.    mouse utility that activates the window  under  the  mouse  pointer
  623.    (such as the DMouse AutoPoint feature)  this  function  won't  give
  624.    you the desired effect.  The same goes  for  NEXTWIN  and  PREVWIN.
  625.  
  626.  **)
  627.    Input/Output uses the StdIn/StdOut of  AmokEd's  process.   If  you
  628.    don't want this, you'll  have  to  redirect  it  from/to  NIL:.  If
  629.    AmokEd is started via 'run >nil: <nil:' or  from  Workbench,  there
  630.    will be no StdIn/StdOut.
  631.  
  632.  
  633.  ---------- Further information for the complex commands ------------
  634.  
  635. INDENT        - moves a line in as many characters  further  than  the
  636.                 closest previou less indented line  as  that  line  is
  637.                 indented from the  beginning  of  the  line.  (I  love
  638.                 German :-)
  639.  
  640.                 Example:
  641.                 0.2.4
  642.                 |   Line 1     <- This line is less indented than line 3
  643.                 |     Line 2   <- This line is not less indented than line 3
  644.                 |    Line 3    <- This is where the cursor is
  645.  
  646.                 After the first INDENT:
  647.                 0.2.4.6.8.
  648.                 |   Line 1
  649.                 |     Line 2   <- This line is now less indented than line 3
  650.                 |       Line 3 <- The cursor is still here
  651.  
  652.                 After another INDENT:
  653.                 0.2.4.6.8.0.2.4.
  654.                 |   Line 1
  655.                 |     Line 2
  656.                 |           Line 3
  657.  
  658. UNINDENT      - Unindents a line so that it is at the same indentation as the
  659.                 closest previous less indented line.
  660.  
  661.                 Example:
  662.  
  663.                 |   Line 1
  664.                 |     Line 2         <- This line is less indented than line 3
  665.                 |            Line 3  <- The cursor is on this line
  666.  
  667.                 After the first UNINDENT:
  668.                 0.2.4.6.8.
  669.                 |   Zeile 1     <- This is now the less indented line
  670.                 |     Zeile 2
  671.                 |     Zeile 3   <- The cursor is still here
  672.  
  673.                 After the second UNINDENT
  674.                 0.2.4.6.8.
  675.                 |   Zeile 1
  676.                 |     Zeile 2
  677.                 |   Zeile 3
  678.  
  679. MENUOFF       - These commands enable or disable  the  pulldown  menus
  680. MENUON          For people who put a lot of MENUADD commands in  their
  681.                 '.aedrc' file, it may be useful to know  that  if  you
  682.                 first turn off the menus,  that  the  MENUADD  command
  683.                 will operate noticeably faster. (There after  you  can
  684.                 naturally turn the menus back on!)
  685.  
  686.                 The commands can be nested.  In other  words,  if  you
  687.                 use MENUOFF twice, then you will need  to  use  MENUON
  688.                 twice to enable the menus again. (Of course it doesn't
  689.                 work the other way around.)
  690.  
  691. CHECKRESET    - Here it is important to note that simply activating  a
  692. CHECKSET        toggle menu item doesn't cause the menu item checkmark
  693. CHECKTOGGLE     to change.  That makes it easy to use  the  equivalent
  694.                 keyboard key to implement the menu function.
  695.  
  696.                 Example:
  697.                   menuaddt test test c-help
  698.                   map c-help (toggle 5 checktoggle test-test)
  699.  
  700.                 Mutual exclusion is also possible. For example:
  701.                   menuaddt test test1  -help
  702.                   menuaddt test test2 s-help
  703.                   map  -help (checkreset test-test2 checkset test-test1)
  704.                   map s-help (checkreset test-test1 checkset test-test2)
  705.                   map c-help (checktoggle test-test1 checktoggle test-test2)
  706.  
  707. SCANF ctlstr  - This command is similar to the C-function scanf().  At
  708.                 this point only string variables can be scanned.   The
  709.                 function if mostly used in coordination with the CTAGS
  710.                 command (woefully  omitted  from  this  distribution).
  711.  
  712. REPEAT n arg  - Repeat the commands in <arg> 'n' times.
  713.  
  714.             In addition to a strict number, the following  values  can
  715.             be used:
  716.  
  717.                   line      the current line number (lines begin with 1)
  718.                   lbot      the lines to the last line in the text
  719.                   cleft     the current column number (columns begin with 0)
  720.                   cright    the number of columns to the right of the
  721.                             cursor until the end of the line, including
  722.                             the character under the cursor.
  723.                   tr        the number of characters to the next tab stop.
  724.                   tl        the number of characters to the previous tab
  725.                             stop
  726.                   wlinetop  the number of lines to the window's top
  727.  
  728.                 Different commands can abort  the  repeat-loop.   Each
  729.                 FIND, FINDR, NEXT, NEXTR, PREV, and PREVR in which the
  730.                 search is unsuccessful will stop  the  loop  (and  the
  731.                 macro.)  The same thing  happens  with  commands  that
  732.                 try to move beyond the limits of the  file  (e.g:  UP,
  733.                 DOWN, LEFT, RIGHT, ...)
  734.  
  735.                 Naturally, ABORT also terminates the macro.
  736.  
  737.                 If you specify -1 for 'n', the  repeat  will  continue
  738.                 essentially for ever ($7fffffff times to  be  precise,
  739.                 which should suffice for most anything), or until  the
  740.                 loop aborts for some reason.
  741.  
  742.              Example: Search  and  replace  through  the  entire  text
  743.                       (what is better done with MULTIREPLACE :-)
  744.  
  745.                map c-R (escimm (findstr ) escimm (repstr ) repeat -1 nextr)
  746.  
  747. IF [!]condition arg
  748. WHILE [!]condition arg
  749. IFELSE [!]condition ifarg elsearg
  750.  
  751.               - If the given condition is satisfied, the argument is
  752.                 passed on to  the  interpreter.   For  IFELSE  if  the
  753.                 condition is  not  satisfied  the  'elsearg'  is  then
  754.                 executed.  For WHILE,  the  argument  is  executed  so
  755.                 long as the condition is satisfied (Careful!).
  756.  
  757.                 If a '!' is included, the logic is inverted.
  758.  
  759.                 Conditions:
  760.  
  761.                 [i]#    Kippschalter [i]# gesetzt (siehe unten)
  762.                 t       the cursor is on line 1
  763.                 b       the cursor is on the last line
  764.                 l       the cursor is in column 0
  765.                 r       the cursor is at the end of the line (only white
  766.                         space remains underneath and to the right)
  767.                 m       the text has been modified
  768.                 i       insert mode is on
  769.                 x[<=>]# the cursor is in column # (beginning with 1) (see NOTE)
  770.                 y[<=>]# the cursor is in line # (begining with 1) (see NOTE)
  771.                 cl      the cursor character is lower case. ('a'..'z')
  772.                 cu      the cursor character is upper case. ('A'..'Z')
  773.                 ca      the cursor character is alphanumeric.
  774.                         ('A'..'Z', 'a'..'z', '0'..'9', '_', 192..255)
  775.                 cn      the cursor character is a number
  776.                 c[<=>]# the cursor character has an ascii value '#' (see NOTE)
  777.                 cb      the cursor is inside the marked block
  778.  
  779.                 NOTE:
  780.                    comparisons  use  either  a  single  symbol,  or  a
  781.                    combination  of  the  symbols  '<',  '='  and   '>'
  782.                    followed by a decimal value. (eg: y=>23).
  783.  
  784.                    if c<32  .. Character under the cursor is less than 32.
  785.                    if c<>32 .. Character under the cursor isn't 32.
  786.                    if !c=32 .. ditto
  787.                    while !b down
  788.  
  789.                 Example: Simulation of an insertmode toggle switch.
  790.  
  791.                    map a-i (ifelse 0 (toggle 0 settoggle insertmode)
  792.                                      (toggle 0 resettoggle insertmode))
  793.  
  794.                 Example: As long as there are lower case letters, make them
  795.                          upper case, and move to the right.
  796.  
  797.                    map c-U (while cl (tlate -32 right)
  798.  
  799. ICONIFY       - This is a special capability of AmokEd:
  800.  
  801.                 The text window is reduced to a title line.  This  way
  802.                 you can keep several windows open, and still  be  able
  803.                 to find one quickly.
  804.  
  805.                 * The old window position and size is remembered.
  806.                 * The position of the iconified window is remembered
  807.                   for future iconifying.
  808.  
  809. TOGGLE toggle
  810. SETTOGGLE toggle
  811. RESETTOGGLE toggle
  812.  
  813.               - This command changes the state of the toggles.
  814.  
  815.                 There  are  256  global  toggles,  that  retain  their
  816.                 values throughout AmokEd.  There are also  16  toggles
  817.                 maintained separately for each of  the  text  windows.
  818.                 In addition there are  also  several  special  toggles
  819.                 which for example change the insert mode.
  820.  
  821.                 In all, these are the toggles that exist:
  822.  
  823.                 i0..i15      private toggles for each text
  824.                 0..255       global toggles
  825.                 wordwrap     automatic line breaking
  826.                 insertmode   insert mode (also private)
  827.                 savetab      save file with ASCII Tab Characters (see below)
  828.                              (also private)
  829.                 modified     modified status of the file (also private)
  830.                 numlock      status of the number lock for the numeric
  831.                              keyboard
  832.                 ignorecase   ignore case when using FIND, FINDR, etc.
  833.                 saveicons    save texts ans configs with icon
  834.  
  835.  
  836. OBERROR action
  837.  
  838.              Errorsupport for  AmigaOberon.   This  function  is  only
  839.              usable if the oberonsupport.library is  installed.   This
  840.              lib will come with the next release of  AmigaOberon,  but
  841.              can be found on AMOK#72 as well.
  842.              On AMOK#69 there is  a version,  too,  but  that  one  is
  843.              buggy.
  844.  
  845.              action: read     read the error file and show first error
  846.                      first    show first error
  847.                      next     show next error
  848.                      prev     show previous error
  849.                      current  show current error again
  850.  
  851.  
  852.                      --------------------------
  853.               ----------       III          -----------
  854.               ----------     Key Maps       -----------
  855.                      --------------------------
  856.  
  857.   In section II we learned how to program AmokEd (yeah I think program
  858. is the right word for it.)  It starts getting really interesting when
  859. these programs are attached to keyboard keys.  There are three ways of
  860. doing this:
  861.  
  862.   1. The keymap is best kept in a '.aedrc' file, which includes keymaps
  863.      menu definitions, and initializations.
  864.   2. If you want to change a mapped key while AmokEd is running (perhaps
  865.      you would like to type in the word `Rübennase' quite often) you can
  866.      use the MAP command in the command line.
  867.   3. If you would like to keep the new macro definition in your '.aedrc'
  868.      file just press 'a-S' and all your macros will be written out!
  869.  
  870. THE KEYBOARD
  871.  
  872.   Unlike many other editors, any key on the keyboard can be remapped
  873. with or without qualifiers.  Qualifier here means keys such as <Shift>,
  874. <Ctrl>, <Amiga>, or the mouse buttons.
  875.  
  876.   In fact if is only by convention that the <Return> key is mapped to
  877. the RETURN function, and the <Up> key to UP.  However if it were your
  878. preference, you could redefine every key to your own definitions.
  879.  
  880.   Keys are labeled by according to their surfaces with a few exceptions:
  881.  
  882.   * Backspace (the left arrow next to delete) is called 'bs'.
  883.   * The numerical keypad keys are preficed with 'nk' except for the
  884.     <Enter> key which is called 'enter'.
  885.   * The four cursor keys are called 'up', 'down', 'left', and 'right'.
  886.   * The mouse buttons are both qualifiers and keys.  As keys their names
  887.     are 'lmb', 'mmb', 'rmb'.
  888.  
  889.   Key maps
  890.  
  891.   Keys can be remapped using the MAP command (see above)
  892.  
  893.   Keys are specified using the folliwing syntax:
  894.  
  895.     [qual-]<key>  qual: an optional combination of qualifier keys
  896.                         followed by a dash.
  897.                   key:  keyboard key name.
  898.  
  899.     Qualifier: `a'   <Alt>
  900.                `s'   <Shift>
  901.                `c'   <Ctrl>
  902.                `A'   <Amiga>
  903.                `L', `M', `R'  Mouse buttons (mouse buttons can be used
  904.                               as both qualifiers and as keys)
  905.  
  906.   --- Examples ---
  907.  
  908.     tab      <Tab>
  909.     -tab     <Tab>
  910.     a-a      <Alt>a
  911.     a-A      <Alt>A
  912.     A-a      <Amiga>a
  913.     sA-a     <Shift><Amiga> a
  914.     s-tab    <Shift><Tab>
  915.     c-tab    <Ctrl><Tab>
  916.     ac-?     <Alt><Ctrl>?
  917.     s-f5     <Shift><F5>
  918.     nk0      <NumericKeypad 0>
  919.     cs-nk0   <Ctrl><Shift><NumericKeypad 0>
  920.     s-.      <Shift>. ('>' on U.S. keyboards)
  921.     L-f10    <LeftMouseButton><F10>
  922.     L-lmb    <LeftMouseButton><Click>
  923.     L-mmove  <LeftMouseButton><Drag>
  924.     LR-lmb   <RightMouseButton><LeftMouseButton><Click>
  925.  
  926.   -----------------
  927.  
  928. MOUSE BUTTONS
  929.  
  930.   The mouse buttons can be used as keys as well as qualifiers.  As keys
  931.   they can be mapped.  Their names are 'lmb', 'mmb', and 'rmb'.
  932.  
  933.   The standard map is as follows:
  934.  
  935.     L-lmb TOMOUSE     Move the cursor to the mouse when the left mouse
  936.                       button is pressed
  937.     R-rmb ICONIFY     Iconify the window (only if the menu is turned off).
  938.  
  939.     Holding down the left mouse button while moving causes the cursor to
  940.     follow the mouse.
  941.  
  942. Mouse button mapping
  943.  
  944.   Because mouse buttons can be used as qualifiers as well as keys, they
  945.   can be used to modify the action of a keyboard character as follows:
  946.  
  947.     map  L-a    ((Left mousebutton with `a'))
  948.  
  949.   or they can be used to perform a function in and of themselves:
  950.  
  951.     map  L-lmb  ((Left mousebutton as a key))
  952.  
  953.   Note that when defining a mouse button as a key, both the qualifier
  954.   and the key names must be used (you can't get the left mouse button
  955.   key pressed without activating the qualifier 'L').
  956.  
  957.   If you map both the mouse button, and some function with the mouse
  958.   button as a qualifier, you should remember that the first function will
  959.   always be carried out (when the button is pressed), and the second will
  960.   occur afterwards:
  961.  
  962.     map L-lmb (tomouse)
  963.     map L-a   ((Hello))
  964.  
  965.   To simplify things it would be a good idea to delete the default mapping
  966.   of 'rmb' (ICONIFY) if you want to use it as a qualifier key.
  967.  
  968.   When the mouse is in motion a further key is available.  The key name
  969.   'mmove' can be used with the qualifiers 'L', 'M', 'R' to perform a function
  970.   while the mouse is being moved:
  971.  
  972.     map L-mmove ((Mouse moved with left mouse button pressed))
  973.     map LR-lmb  ((Left mouse button clicked while right mouse button pressed))
  974.  
  975.   How about this: The characters under the cursor are translated to upper case
  976.                   as long as the mouse is being moved.
  977.  
  978.     map LR-mmove (tomouse if cl (tlate -32))
  979.  
  980.  
  981. POINTERS (no pun intended)
  982.  
  983.   Typically Amiga mouses have only two buttons. These are the left and
  984.   right buttons (LMB, RMB - logical!).  Three button mouses are also
  985.   supported.
  986.  
  987.   Each button can be modified by a combination of the keys: <Shift>,
  988.   <Alt>, <Ctrl>, <Amiga> and the three mouse buttons.  That makes
  989.   seven qualifiers (six if you have the usual mouse) for a total of
  990.   128 combinations of each key (again 64 for the two button mouse.)
  991.  
  992.   The <CapsLock> key is equivalent to <Shift> for the alphabetic keys
  993.   when lit.
  994.  
  995.   The <Alt><Amiga> key is intercepted by Intuition and translated to
  996.   the equivalent of a left or right mouse button.  Other <Amiga> key
  997.   combinations are also caught and interpreted by intuition independently
  998.   of this program.  Some other key combinations may not be available
  999.   due to other programs running on the system.
  1000.  
  1001. The standard Keymap
  1002.  
  1003.   All normal ASCII keys are mapped to their equivalent ASCII values.
  1004.   The <Bs>, <Del>, <Up>, <Down>, <Left>, <Right>, <Tab>, <Shift><Tab>,
  1005.   and <Enter> keys should all have the expected effect.  The rest
  1006.   are defined as follows:
  1007.  
  1008.     map (a-c)       (bcopy)
  1009.     map (a-d)       (bdelete)
  1010.     map (a-down)    (scrolldown)
  1011.     map (a-l)       (while cu (tlate +32 right))
  1012.     map (a-m)       (bmove)
  1013.     map (a-r)       (nextr)
  1014.     map (a-s)       (bsource)
  1015.     map (a-u)       (while cl (tlate -32 right))
  1016.     map (a-up)      (scrollup)
  1017.     map (bs)        (bs)
  1018.     map (c-/)       (escimm (find ))
  1019.     map (c-])       (ref)
  1020.     map (c-[)       (ctags)
  1021.     map (c-1)       (goto block)
  1022.     map (c-b)       (block)
  1023.     map (c-c)       ()
  1024.     map (c-del)     (remeol)
  1025.     map (c-down)    (pagedown)
  1026.     map (c-esc)     (recall)
  1027.     map (c-f)       (reformat)
  1028.     map (c-g)       (escimm (goto ))
  1029.     map (c-i)       (insertmode on)
  1030.     map (c-j)       (join)
  1031.     map (c-l)       (wleft)
  1032.     map (c-n)       (next)
  1033.     map (c-o)       (insertmode off)
  1034.     map (c-p)       (prev)
  1035.     map (c-q)       (quit)
  1036.     map (c-r)       (wright)
  1037.     map (c-s)       (split first down)
  1038.     map (c-u)       (unblock)
  1039.     map (c-up)      (pageup)
  1040.     map (c-w)       (wordwrap toggle)
  1041.     map (del)       (del)
  1042.     map (down)      (down)
  1043.     map (enter)     (return)
  1044.     map (esc)       (esc)
  1045.     map (f1)        (escimm (insfile ))
  1046.     map (f10)       (saveold quit)
  1047.     map (f2)        (escimm (newfile ))
  1048.     map (f3)        (escimm (newwindow newfile ))
  1049.     map (f6)        (saveold iconify)
  1050.     map (f7)        (escimm (bsave ))
  1051.     map (f8)        (saveold escimm (newfile ))
  1052.     map (f9)        (saveold)
  1053.     map (L-lmb)     (tomouse)
  1054.     map (L-mmo)     (tomouse)
  1055.     map (left)      (left)
  1056.     map (R-rmb)     (iconify)
  1057.     map (return)    (return insline up firstnb down)
  1058.     map (right)     (right)
  1059.     map (s- )       (( ))
  1060.     map (s-del)     (deline)
  1061.     map (s-down)    (bottom)
  1062.     map (s-left)    (first)
  1063.     map (s-right)   (last)
  1064.     map (s-tab)     (backtab)
  1065.     map (s-up)      (top)
  1066.     map (sa-s)      (unblock block block bsource)
  1067.     map (tab)       (tab)
  1068.     map (up)        (up)
  1069.     map `a-)'       (`:-)')     ...a standard smiley face :-)
  1070.  
  1071.  
  1072.                   -------------------------------
  1073.            ----------          VI             ----------
  1074.            ----------      ARexx Support      ----------
  1075.                   -------------------------------
  1076.  
  1077.   From AmokEd you have access to the full functionality of ARexx.
  1078.   In addition there are several commands that can only be used from
  1079. ARexx or an ARexx program. (e.g: ReturnValue)
  1080.  
  1081. ARexx macro activation
  1082.  
  1083.   There are three ways to activate an external ARexx Macro:
  1084.   * The commands RX, RX1, and RX2 call an ARexx macro with the macro
  1085.     name as the first argument, and zero to two arguments for the
  1086.     macro following.  If you need more than two arguments, just use
  1087.     RX1, and put all of the arguments in parentheses. Eg:
  1088.           rx  demo
  1089.           rx1 renumcomproc 119
  1090.           rx2 DelAllAsterix 23 28
  1091.           rx1 MakroMitVielenArgs (1 2 3 4 5 6 7)
  1092.  
  1093.   * The second possibility is to simply place the ARexx command on a
  1094.     command line with the arguments after it.  If AmokEd encounters
  1095.     a command it doesn't know how to deal with, the default action is
  1096.     to pass it on to ARexx.  The rest of the command line is passed
  1097.     along with the command name.  The same is true for macro keys, but
  1098.     it is better to use the RX commands when activating ARexx from a
  1099.     mapped key.  Eg:
  1100.           MakroMitVielenArgs 1 2 3 4 5 6 7
  1101.  
  1102.   * The command RXS allows you to type in ARexx commands directly. In
  1103.     this case the argument is not interpreted as a macro name, rather
  1104.     it is given to ARexx as a command string (see 'stringfile' in the
  1105.     ARexx Manual). Eg:
  1106.           rxs (address command 'copy #? ram:')
  1107.  
  1108.   From ARexx Macros, commands can be sent to AmokEd as usual.  Using
  1109.   the return value 'rc' (in ARexx) you can determine if the desired
  1110.   action was completed successfully.  For more information please refer
  1111.   to the AmokEd ARexx documentation.
  1112.  
  1113. Controlling AmokEd from ARexx
  1114.  
  1115.   AmokEd will let itself be controlled from external ARexx macros, that
  1116.   haven't been activated from within AmokEd.  To do so you (or your
  1117.   macro) will need to know the name of the ARexx port beloging to the
  1118.   copy of AmokEd with which it wants to talk. This port name is avail-
  1119.   able in the variable $rexxport, since it may be generated to be
  1120.   unique (see above).
  1121.  
  1122.   If you have only one AmokEd program active, and have RexxArpLib
  1123.   installed, you can use:
  1124.      rxs (setenv rexxport $rexxport)
  1125.  
  1126.   Export the name of the AmokEd ARexx-Port to an ARexx environment
  1127.   variable for use by external programs.  Better options are available
  1128.   for some applications. (see below).
  1129.  
  1130.   There is a special ARexx command that is only available through the
  1131.   ARexx-Port:
  1132.  
  1133.     GetVal    - Returns the requested variable value.
  1134.  
  1135.         Example: The AEd-Command
  1136.               rxs (options results; getval $rexxport; say result)
  1137.  
  1138.         Shows the name of the AEd-RexxPort on the to the stdout file.
  1139.  
  1140.   More information about ARexx and AmokEd is available in the AmokEdARexx
  1141.   documentation.
  1142.  
  1143.  
  1144.                  --------------------------------
  1145.           ----------           VII            ----------
  1146.           ----------   The Application Port   ----------
  1147.                  --------------------------------
  1148.  
  1149.   A further improvement in AmokEd is the application port.  By using this
  1150.   port you can talk directly to any application which supports an ARexx
  1151.   interface.
  1152.  
  1153.   The application has to register itself with AmokEd.  To do so you just
  1154.   need to give it the name of the port with which it is to communicate which
  1155.   can be found in the variable $rexxport.
  1156.  
  1157.   Starting the application from AmokEd is quite easy:
  1158.       execute (run <nil: >nil: AmokEd:ApplDemo $rexxport)
  1159.  
  1160.   Note that the application has been run in the background.  This is
  1161.   very important because AmokEd waits for the EXECUTE command to complete
  1162.   before continuing.
  1163.  
  1164.   Next the application should register with AmokEd and inform it of the
  1165.   application port name under which it can be reached.  When that has
  1166.   happened, the can be used quite easily:
  1167.  
  1168.   * Just put the application name int the command line.  The rest of the
  1169.     line is treated as arguments to the application port.  (Just as with
  1170.     ARexx.)
  1171.   * The APPL command can be used like the RX1 command to call functions
  1172.     in the application with one argument.  This is the appropriate way
  1173.     to activate the application commands from keyboard macros:
  1174.         ApplDemo Hey There!              -- from the command line
  1175.         appl ApplDemo (Hey There!)       -- from a macro
  1176.  
  1177.   More precise information is application dependent.  Check the manuals
  1178.   for the programs you want to communicate with for the functions and
  1179.   parameters available through its ARexx port.
  1180.  
  1181.   For everything else - Programming etc. - please look under the
  1182.   special documentation.
  1183.  
  1184. ---------------------------------------------------------------------------
  1185.  
  1186. [Translator's Note:  Several descriptions throughout this document have
  1187.  been fleshed out a bit.  It is hoped that this will help to diminish
  1188.  some of the confusion present in the original text]
  1189.  
  1190. +++hartmut
  1191.  
  1192. ---------------------------------------------------------------------------
  1193. Release Notes:
  1194.  
  1195. Legend: + added, - removed, ^ improved
  1196.  
  1197.  V1.30 - 09 Aug 1992 (release)
  1198.   + supports reading file packe with a XPK-Lib (and so PowerPacker)
  1199.   + MATCHBRACKET
  1200.   + OberonSupport (throwed all prinziples aside not to build in
  1201.   language dependant stuff, but it was _very_ cheap)
  1202.   + BusyPointer, system requester come up on AmokEd's screen
  1203.   + AppMenuItem (if not on WB screen), AppWindow
  1204.   + toggle: SaveIcons
  1205.   + save with icons, defaults: ENV:AmokEd/def_(text|config).info
  1206.   + ToolType/Shell-Option: NOAPPMENU
  1207.   · iconified window has Depth- and Zoom-Gadget
  1208.   · Portname and ScreenName are made unique if necessary
  1209.   · build in some requesters (e.g. VERSION, load inquiry)
  1210.   - bug in FIND
  1211.   - bug: dead keys haven't been working
  1212.  
  1213.  V1.29 - 19 Jun 1992 (intern)
  1214.   ^ revised WordWrap and Reformat again:
  1215.     ^ in insert mode the will be a line-proof only if the line is
  1216.       full:
  1217.          |blafasel   *      |  * Cursor    inserting a charakter here
  1218.          |jdf jdfjjdjf dfl  |              will not proof the lines
  1219.                             ^ margin
  1220.     · in insertmode the will be only a line-proof till the lines
  1221.       allign, using REFORMAT till paragraph ending (now work like
  1222.       this)
  1223.   - bugs in parser
  1224.   · iconified windows below each other
  1225.   · gadgets as BOOPSI gadgets (GadTools not suitable for my needs)
  1226.   · 'IF cl', 'IF cu' know umlauts
  1227.  
  1228.  V1.28 - 04 Mai 1992 (internal)
  1229.   + Variablen: $winleft, $wintop, $winwidth, $winheight,
  1230.                $tmpleft, $tmptop, $tmpwidth, $tmpheight,
  1231.                $screenname, $portname (will relapce $rexxport)
  1232.   + TMPLEFT, TMPTOP, ARPSAVECONFIG
  1233.   ^ completly new configuration file format (IFF)
  1234.   · $rexxport obsolete
  1235.   · new memory management: avaiods MungWall hits
  1236.   · does no longer source S:.aedrc/.aedrc but only file stated in the
  1237.     config
  1238.   · search order for config files like StyleGuide (but not exactly)
  1239.   · scroller as GadTools gadget
  1240.  
  1241.  V1.27 - 16 Apr 1992 (internal)
  1242.   · chnges shell parmeters (besides 'cause of DOS and StyleGuide)
  1243.   · REMBOL is now REMSOL (SytleGuide!)
  1244.   · variable are stored in the local shell environment
  1245.   - Bug: (iconify newwindow arpload) -> crash
  1246.  
  1247.  V1.26 - 14 Apr 1992 (internal)
  1248.   · after execution of an ARexx marco the texts dir lock is taken
  1249.     form the process' current dir
  1250.   - fixed problem with the new locking mechanism
  1251.  
  1252.  V1.25 - 16 Apr 1992 (small release)
  1253.   IMPORTANT: AmokEd now needs AmigaOS2.0 or higher!!
  1254.   - Bug: Pattern has been overwritten (ony in the release :-(
  1255.   + template for ReadArgs.
  1256.   · NumLock now only for unqualified keys
  1257.   + PubScreens
  1258.     AmokEd opens its screen as public screen (with the geven name)
  1259.     and can open its windows on a given screen, default: worckbench
  1260.     screen
  1261.   ^ cond. for REPEAT: lwintop = numo lines to window top
  1262.   + SETPATTERN: sets pattern for file requester
  1263.   + by `IF m' and `$modified' the line will be written back, so the
  1264.     asked status the the real
  1265.   - Bug: scrolled to the right, if outside the proper window but not
  1266.     onto the the scroller
  1267.   + new variable: $path holds the complete path for the files
  1268.     directory
  1269.   · $filename now only hold the filepart
  1270.   · The current dir of AmokEd is now always the dir lock of the text
  1271.   · WordWrap now only breaks the line written, no longer the
  1272.     following are pulled up
  1273.     Reformat works as usual.
  1274.   · ToolTypes support (ToolType for WINDOW will be changed soon)
  1275.   - Bug: while MultiReplace it was possible to move the cursor
  1276.     around and replace at the wrong place
  1277.  
  1278.  V1.20c - 09 Feb 1992
  1279.    + Justify, Unjustify
  1280.    + new variables: $margin, $modified, $currentline
  1281.    + Modifed schaltbat (mittels *Toggle)
  1282.    + GotoCol
  1283.    ^ Scrollbar now fully functional :-) Thanks to Tobias Ruland
  1284.    - Bug in the Rexx routiens (Volkers SPrintf is subject to errors)
  1285.    - Bug in BDelete: bad column number, if Block = EndofText
  1286.    - Bug in *Toggle: title has not been saved
  1287.  
  1288.  V1.12 - 25 Dec 1991
  1289.    + MenuAddT: MenuItem with CheckMark
  1290.    + MenuAddSep
  1291.    + CheckSet, CheckRest, CheckToggle: Toggle for the CheckMarks
  1292.    + Insert, Overwrite: ability to add text independent of insertmode
  1293.    + NextWin, PrevWin: moves the windows to the front in order
  1294.    + Cursor only halfheight in overwrite mode
  1295.    + CaseInsensitive Find/Replace
  1296.    + Indent, Unindent, TabIndent, TabUnindent
  1297.    + Turbo-Mode for Multireplace (without Screen-Update)
  1298.      Time comparison: in Intuition.mod # -> * (before * -> #)
  1299.        mrplc all    1 min 35 sec.
  1300.        mrplc turbo        17 sec.
  1301.    + NoScrUpdate
  1302.    + ArpSoure
  1303.    + RemBOL
  1304.    + ASCII
  1305.    - Toggle: AutoIndent (better controlled by Indent/TabIndent)
  1306.    - Bugs dReformat
  1307.    - Bug: m-mmb didn't work
  1308.    - lots of little bugs
  1309.     MinWidth can't be exceeded any longer
  1310.    ^ PropGadget and WinHeight now still correct for large fonts
  1311.    ^ PropGadget under 2.0 in NewLook, under 1.3 as before
  1312.    ^ AprSave uses ASL-SaveReq (if ASL is available)
  1313.  
  1314.  V1.02b - 21 Oct 1991
  1315.    - Bug in ArpLoad (File/path-Split)
  1316.  
  1317.  V1.02 - 19 Oct 1991
  1318.     older release notes removed
  1319.  
  1320.